/***************************************************************************
 创建者: 华磊
 开始时间: 2019.4.26
 copyright: (C) 华友高科
 修改说明: (每次有修改就添加一条，带有 修改人，修改时间，修改描述)
 example (1) hualei 2017.5.8 类的具体实现代码编写

 ***************************************************************************
 *  @file x.h
 *  功能:
 *
 *                                                                         *
 ***************************************************************************/
#ifndef VISIONRUNLOGIC_H
#define VISIONRUNLOGIC_H
#include "GeneralDefine.h"
#include "visioncleardatainstruction.h"
#include "visiongetdatainstruction.h"
#include "visionruninstruction.h"
#include "visiontriggerinstruction.h"

class McControllerThread;
class ProgramEngine;

class VisionRunLogic
{
public:
    VisionRunLogic(int robotIdIn, ProgramEngine* programEngineIn,
                   McControllerThread *programMcControllerIn);

public:
    E_PROGRAM_LOOP_RESULT startVisionRun(int programNumIn, const VisionRunInstruction &instructionIn, int lineIndex);
    E_PROGRAM_LOOP_RESULT startVisionClearData(int programNumIn, const VisionClearDataInstruction &instructionIn, int lineIndex);
    E_PROGRAM_LOOP_RESULT startVisionGetData(int programNumIn, const VisionGetDataInstruction &instructionIn, int lineIndex);
    E_PROGRAM_LOOP_RESULT startVisionTrigger(int programNumIn, const VisionTriggerInstruction &instructionIn, int lineIndex);

private:
    int robotId;
    /**
     * @brief programMcController       算法线程指针
     */
    McControllerThread *programMcController;
    ProgramEngine* programEngine;
};

#endif // VISIONRUNLOGIC_H
